<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<script type="text/javascript">
	$(function() {
		$('.tipMe').tooltip({
			'placement' : 'top'
		});
		
	})


	function insertOrUpdate() {  
	   var id=1;
	   var vr = $("input[name='optionsRadios']:checked").val();
       alert(vr);
	
		$.ajax({
			type : "GET",
			dataType : "json",
			cache : false,
			url : _ctx + "/registry/ga_data_insertOrUpdate.do",
			data : {
			    id :id,
				gapOwner : vr
			},
			success : function(content) {
				$('#data').html(content);
				$('#myModal').modal('show');
			},
			error : function() {
				ui.msg('信息加载错误', 0);
			}
		});
	}
</script>
</head>
<body>
	<%@ include file="/WEB-INF/view/common/topbar.jsp"%>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<%@ include file="/WEB-INF/view/common/sidebar.jsp"%>
			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb">
						<li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
						<li><a href="#">网闸交换配置</a></li>
						<li><a href="#">网闸节点配置</a></li>
					</ul>
				</div>

				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">

							<div class="alert alert-block alert-success">
								<button type="button" class="close" data-dismiss="alert">
									<i class="icon-remove"></i>
								</button>

								<i class="icon-ok green"></i> 根据可选用网闸节点，选择需更新的网闸编码。
							</div>
										<h3 class="row-fluid header smaller lighter ">
											<span class="span7">设置本地节点默认使用的网闸节点 </span><!-- /span -->

											<span class="span5">
												<label class="pull-middle inline">
	                        <button  class="btn btn-sm  btn-primary"  onclick="insertOrUpdate()">
											保存
										</button>
													<span class="lbl"></span>
												</label>
											</span><!-- /span -->
										</h3>
								
						    <div class="container">
									<c:forEach var="vo" items="${getUserConf}">
										<tr>
											<td><div class="radio-inline">
													<label> <input type="radio" name="optionsRadios"
														 value="${vo.gapOwner}" checked > ${vo.nodeName} </label>
												</div>
										   </td>
										</tr>
										</c:forEach>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
